str = input("请输入一串数字：")
strs = [int(i) for i in str.split(',')]
for i in range(0,len(strs)):
    print(strs[len(strs)-i-1])